package cc.fs.zhihuapp.ui.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import cc.fs.zhihuapp.R;

/**
 * Created by fostion on 2015/9/6.
 */
public abstract class BaseListFragment extends BaseFragment {

    //定义listview布局
    private int layoutId = R.layout.item_recycle_view;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return  inflater.inflate(layoutId,container,false);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    //设置layoutManager
    public abstract RecyclerView.LayoutManager getLayoutManager();
    //设置ListAdapter
    public abstract RecyclerView.Adapter<RecyclerView.ViewHolder> getListAdapter();

}
